<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>漂流瓶列表</h2>
    </div>
    <div class="cf">
        <div class="fl">
            <div class="tb-unit-bar">
            <a class="btn" href="{:U('giftbag_add')}">新 增</a>
        </div>
            <!--<button class="btn ajax-post confirm" url="{:U('spec_de',array('id'=>$vo['id']))}" target-form="ids">删 除</button>-->
        </div>


        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
                <!--<a class="sch-btn" href="javascript:;" id="search" url="{:U('business_search')}"><i class="btn-search"></i></a>-->
            </div>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table class="">
            <thead>
            <tr>
                <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                <th class="">ID</th>
                <th class="">金额</th>
                <th class="">钻石数</th>
                <th class="">免费天数</th>
                <th class="">vip等级</th>
                <th class="">用户等级</th>
                <th class="">漂流瓶类型</th>
                <th class="">创建时间</th>
                <th class="">操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="list">
                <volist name="list" id="vo">
                    <tr>
                        <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
                        <td>{$vo.id} </td>
                        <td>{$vo.price}</td>
                        <td>{$vo.zs_num}</td>
                        <td>{$vo.day}</td>
                        <td>{$vo.level}</td>
                        <td>{$vo.user_level}</td>
                        <td><if condition="$vo.type eq 1">钻石漂流瓶<else/>贵族漂流瓶</if></td>
                        <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                        <td>
                            <a href="{:U('giftbag_add',array('id'=>$vo['id']))}" >编辑</a>
                            <a href="{:U('giftbag_del',array('id'=>$vo['id']))}" onclick="return confirm('是否确认删除')" >删除</a>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">

        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });


        //导航高亮
        highlight_subnav("{:U('Manage/giftbag')}");
        //获取市

    </script>
</block>
